#include <string.h>

char *Basename(char *pathname) {
    char *cp;       // WorkPointer

    if((cp = strrchr(pathname,'/')))
    return cp + 1;  // Return basename pointer
    return pathname;
}